import { axios } from '@/utils/request'

/**
 * api接口列表
 */
const api = {
  list: '/erp_meixingtiyu/referee/list',
  add: '/erp_meixingtiyu/referee/add',
  edit: '/erp_meixingtiyu/referee/edit',
  delete: '/erp_meixingtiyu/referee/delete',
  free: '/erp_meixingtiyu/referee/free',
}

/**
 * 裁判列表
 */
export function list (params) {
  return axios({
    url: api.list,
    method: 'get',
    params
  })
}

/**
 * 添加裁判
 */
 export function add (params) {
  return axios({
    url: api.add,
    method: 'get',
    params
  })
}

/**
 * 修改裁判
 */
 export function edit (params) {
  return axios({
    url: api.edit,
    method: 'get',
    params
  })
}

/**
 * 删除裁判
 */
 export function del (params) {
  return axios({
    url: api.delete,
    method: 'get',
    params
  })
}

/**
 * 获取空闲的裁判（没有选择场地的）
 */
 export function free (params) {
  return axios({
    url: api.free,
    method: 'get',
    params
  })
}